import { test } from 'node:test'; import assert from 'node:assert'; import { capitalize } from '../src/capitalize.js'; test('capitalize normal string', () => { assert.strictEqual(capitalize('hello'), 'Hello'); }); test('capitalize empty string returns empty string', () => { assert.strictEqual(capitalize(''), ''); }); test('capitalize non-string input throws TypeError', () => { assert.throws( () => capitalize(123), { name: 'TypeError', message: 'Input must be a string', } ); });